Variation on MultiCam Media Controller#1171
Conversation
BryonLewis
left a comment
There was a problem hiding this comment.
Just adding these here for reference.
BryonLewis
left a comment
There was a problem hiding this comment.
Small comments, which I may try to address after this initial merging. Making an internal list of things I need to update/fix like v-mousetrap and handling some weird switching of camera instances.
| // const offsetX = evt.clientX + 10; | ||
| // const offsetY = evt.clientY - 25; | ||
| // window.requestAnimationFrame(() => { | ||
| // if (imageCursorRef.value) { | ||
| // imageCursorRef.value.style.transform = `translate(${offsetX}px, ${offsetY}px)`; | ||
| // } | ||
| // }); |
There was a problem hiding this comment.
is this intended to be handled outside of the individual cameras?
There is some stuff that I probably need to do to get mouse-trap shortcuts working as well as proper behavior of being in a 'new' state and selecting a different camera before completing an annotation.
There was a problem hiding this comment.
I couldn't figure out what this did, so I disabled it to see if anything broke.
It doesn't appear to be doing anything. What is this for?
There was a problem hiding this comment.
OK, thanks. Not sure why I didn't notice it.
There was a problem hiding this comment.
I'll fix this now, and try and resolve the CI failure.
* figuring stuff out by breaking it * need to redo useMediaController * getting useMediaController to use multiple cameras * some basic loading working * fixing some css * adding in multi-data-loading * Track modifications for multicam * some minor fixes * minor build changes * build lib fix * fixing build finally * Variation on MultiCam Media Controller (#1171) * WIP * Doneish * WIP * adding icons and keyboard shortcuts * fix emit * modifying symbols to strings for TS * build fix * fixing controls collapse sizing * reloading syncing * addressing comments * additional fixes * switching to singleCam for default name * changing to 'as Track' Co-authored-by: Brandon Davis <git@subdavis.com>
* figuring stuff out by breaking it * need to redo useMediaController * getting useMediaController to use multiple cameras * some basic loading working * fixing some css * adding in multi-data-loading * Track modifications for multicam * some minor fixes * minor build changes * build lib fix * fixing build finally * Variation on MultiCam Media Controller (#1171) * WIP * Doneish * WIP * adding icons and keyboard shortcuts * fix emit * modifying symbols to strings for TS * build fix * fixing controls collapse sizing * removal of camTrackMap * removal of camTrackMap * starting to add in tools for multiCam * adding in tools beginning * reloading syncing * additional updates * Adding editing mode clicking transfers, cleaning up getTrack and adding camera synchronization * fixing keyframe issues, fixing tests, adding trackMerge for multicameras * refactoring trackMap to camMap * Adding the getAnyTrack function * updating * modifying for updated view * adding in UI for multicam tools * adding in user prompt for single camera pipelines on multicam data * basic linking is working * fixing tests * updating camera settings * fixing some removal logic * mend * began addressing comments * Addressing more errors * fixing more bugs * Fixing lockCamera definition * fixing camera swapping and track linking * disabling trackMerge * fixing pipelines/linking Co-authored-by: Brandon Davis <git@subdavis.com>

Summary of changes
useMediaController. That composition function treats all cameras the same:defaultis not a special case.{} as MediaController, and instead throws a proper exception if the mediaController is ever attempted to be used before initialization.ref.value.mediaControllerDescription of logic
useMediaController(rather than a specific camera), which injects 2 static references for all children of Viewer.AgregateControllerandcameraInitializer.provide()ed one layer up, it's no longer necessary to pass through the template.cameraInitializerfunction during theirsetup(). They no longer have to worry about the internals ofuseMediaController.data, and are not given access to any state but their own.Drawbacks to this approach
cameraInitializerhad to be written excplicitly rather than inferred because of the provide/inject pattern.seek, play, pause, etc.to the initializer before those function definitions have executed. This isn't currently an issue because none of those functions are called except by human interaction, but it's worth noting.Other caveats
This is not ready to merge, but it is ready to at least discuss.